public class TestDemo {
    public static void main(String[] args) {
        MyTimer myTimer = new MyTimer();
        System.out.println("程序启动");
        myTimer.schedule(new Runnable() {
            @Override
            public void run() {
                System.out.println("计时器3");
            }
        },3000);
        myTimer.schedule(new Runnable() {
            @Override
            public void run() {
                System.out.println("计时器2");
            }
        },2000);
        myTimer.schedule(new Runnable() {
            @Override
            public void run() {
                System.out.println("计时器1");
            }
        },1000);
    }
}

